import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
import javax.swing.event.*;

public class AddPatient extends JPanel {
	private JButton clear, addition;
	private JTextField fn, ln, ad, add, addr, ci, st, zi, ss, bd, jo, ic, fn1, ln1, ad1, add1, addr1, ci1, st1, zi1, ss1, bd1, jo1, fn2, ln2, ad2, add2, addr2, ci2, st2, zi2, ss2, bd2, jo2;
	private JLabel  empty, firstName, lastName, address, city, state, zip, ssn, birthDate, job, title, sex, insurance, insuranceCompany, parentalGuardian1, parentalGuardian2;
	private String[] title1 = {"Mr.", "Mrs.","Jr.","Miss","Sr,"};
	private String[] sex1 = {"Male", "Female"};
	private JPanel bt, top, info1, info2, info3, infop1, infop2, infop3, infopg1, infopg2, infopg3, infopg4, infopg5, infopg6, insurancepanel, pg1, pg2;
	public AddPatient(int length, int width)
	{
		//initialize
		clear = new JButton("Clear");
		addition = new JButton("Add");
		JComboBox CB = new JComboBox(title1);
		JComboBox CB1 = new JComboBox(sex1);
		empty = new JLabel("");

		fn = new JTextField("");
		ln = new JTextField("");
		ad = new JTextField("");
		add = new JTextField("");
		addr = new JTextField("");
		ci = new JTextField("");
		st = new JTextField("");
		zi = new JTextField("");
		ss = new JTextField("");
		bd = new JTextField("");
		jo = new JTextField("");

		fn1 = new JTextField("");
		ln1 = new JTextField("");
		ad1 = new JTextField("");
		add1 = new JTextField("");
		addr1 = new JTextField("");
		ci1 = new JTextField("");
		st1 = new JTextField("");
		zi1 = new JTextField("");
		ss1 = new JTextField("");
		bd1 = new JTextField("");
		jo1 = new JTextField("");

		fn2 = new JTextField("");
		ln2 = new JTextField("");
		ad2 = new JTextField("");
		add2 = new JTextField("");
		addr2 = new JTextField("");
		ci2= new JTextField("");
		st2 = new JTextField("");
		zi2 = new JTextField("");
		ss2 = new JTextField("");
		bd2 = new JTextField("");
		jo2 = new JTextField("");

		firstName = new JLabel("First Name:");
		lastName  = new JLabel("Last Name:");
		address  = new JLabel("Address:");
		title = new JLabel("Title:");
		sex =  new JLabel("Sex:");
		city =  new JLabel("City:");
		state =  new JLabel("State:");
		zip =  new JLabel("Zip:");
		ssn =  new JLabel("SSN:");
		birthDate =  new JLabel("Birth Date:");
		job =  new JLabel("Job:");
		title =  new JLabel("Add New Patient");
		insurance = new JLabel("Insurance");
		insuranceCompany = new JLabel("Insurance Company:");
		parentalGuardian1 = new JLabel("Parental Guardian 1");
		parentalGuardian2 = new JLabel("Parental Guardian 2");

		top = new JPanel();
		top.add(title);

		bt = new JPanel();
		bt.setLayout(new GridLayout(1,2));
		bt.add(clear);
		bt.add(addition);

		infop1 = new JPanel();
		infop1.setLayout(new GridLayout(2,4));
		infop1.add(firstName);
		infop1.add(fn);
		infop1.add(title);
		infop1.add(CB);
		infop1.add(lastName);
		infop1.add(ln);
		infop1.add(sex);
		infop1.add(CB1);

		infop2 = new JPanel();
		infop2.setLayout(new GridLayout(3, 2));
		infop2.add(address);
		infop2.add(ad);
		infop2.add(empty);
		infop2.add(add);
		infop2.add(empty);
		infop2.add(addr);

		infop3 = new JPanel();
		infop3.setLayout(new GridLayout(3,4));
		infop3.add(city);
		infop3.add(ci);
		infop3.add(state);
		infop3.add(st);
		infop3.add(zip);
		infop3.add(zi);
		infop3.add(ssn);
		infop3.add(ss);
		infop3.add(birthDate);
		infop3.add(bd);
		infop3.add(job);
		infop3.add(jo);

		info1 = new JPanel();
		info1.setLayout(new BorderLayout());
		info1.add(infop1, BorderLayout.NORTH);
		info1.add(infop2, BorderLayout.CENTER);
		info1.add(infop3, BorderLayout.SOUTH);

		infopg1 = new JPanel();
		infopg1.setLayout(new GridLayout(2,4));
		infopg1.add(firstName);
		infopg1.add(fn1);
		infopg1.add(title);
		infopg1.add(CB);
		infopg1.add(lastName);
		infopg1.add(ln1);
		infopg1.add(sex);
		infopg1.add(CB1);

		infopg2 = new JPanel();
		infopg2.setLayout(new GridLayout(3, 2));
		infopg2.add(address);
		infopg2.add(ad1);
		infopg2.add(empty);
		infopg2.add(add1);
		infopg2.add(empty);
		infopg2.add(addr1);

		infopg3 = new JPanel();
		infopg3.setLayout(new GridLayout(3,4));
		infopg3.add(city);
		infopg3.add(ci1);
		infopg3.add(state);
		infopg3.add(st1);
		infopg3.add(zip);
		infopg3.add(zi1);
		infopg3.add(ssn);
		infopg3.add(ss1);
		infopg3.add(birthDate);
		infopg3.add(bd1);
		infopg3.add(job);
		infopg3.add(jo1);

		info2 = new JPanel();
		info2.setLayout(new BorderLayout());
		info2.add(infopg1, BorderLayout.NORTH);
		info2.add(infopg2, BorderLayout.CENTER);
		info2.add(infopg3, BorderLayout.SOUTH);

		infopg4 = new JPanel();
		infopg4.setLayout(new GridLayout(2,4));
		infopg4.add(firstName);
		infopg4.add(fn2);
		infopg4.add(title);
		infopg4.add(CB);
		infopg4.add(lastName);
		infopg4.add(ln2);
		infopg4.add(sex);
		infopg4.add(CB1);

		infopg5 = new JPanel();
		infopg5.setLayout(new GridLayout(3, 2));
		infopg5.add(address);
		infopg5.add(ad2);
		infopg5.add(empty);
		infopg5.add(add2);
		infopg5.add(empty);
		infopg5.add(addr2);

		infopg6 = new JPanel();
		infopg6.setLayout(new GridLayout(3,4));
		infopg6.add(city);
		infopg6.add(ci2);
		infopg6.add(state);
		infopg6.add(st2);
		infopg6.add(zip);
		infopg6.add(zi2);
		infopg6.add(ssn);
		infopg6.add(ss2);
		infopg6.add(birthDate);
		infopg6.add(bd2);
		infopg6.add(job);
		infopg6.add(jo2);

		info3 = new JPanel();
		info3.setLayout(new BorderLayout());
		info3.add(infopg4, BorderLayout.NORTH);
		info3.add(infopg5, BorderLayout.CENTER);
		info3.add(infopg6, BorderLayout.SOUTH);

		//main layout
		setLayout(new BoxLayout(this, BoxLayout.PAGE_AXIS);
		add(top)
		add(info1);
		add(info2);
		add(info3);
	}
}
